#ifndef CLNSPACE_CONNECTION_MANAGER_HPP
#define CLNSPACE_CONNECTION_MANAGER_HPP

#include "StdAfx.h"
#include "cln_connection.hpp"

namespace fly {

	namespace jld{

		namespace client
		{
			class connection_manager: private boost::noncopyable
			{
			public:
				/// Add the specified connection to the manager and start it.
				void start(connection_ptr c);

				/// Stop the specified connection.
				void stop(connection_ptr c);

				/// Stop all connections.
				void stop_all();

				const size_t connection_size();
			private:
				/// The managed connections.
				std::set<connection_ptr> connections_;
			};

		}
	}
}
#endif